import json

with open('data/sft_train_cf.json', 'r', encoding='utf-8') as f:
    data = json.load(f)
    
# 假设data是包含多个对象的数组
# output = [{"text": item["output"]} for item in data]

output = [[item["output"]] for item in data]
    
# with open('data/pt_train_cf.json', 'w', encoding='utf-8') as f:
#     json.dump(output, f, ensure_ascii=False, indent=4)

with open('train_cf/src/20250623/pt_train_cf.json', 'w', encoding='utf-8') as f:
    json.dump(output, f, ensure_ascii=False, indent=4)
